<template>
  <li class="list-group-item">
    <div class="checkbox">
      <label>
        <input
          :checked="todo.completed"
          type="checkbox"
          @change="$emit('change', todo.completed, todo.id)"
        />
        {{ todo.title }}---{{ todo.completed ? '已完成' : '未完成' }}
      </label>
    </div>
  </li>
</template>
<script>
export default {
  props: ['todo'],
  data() {
    return {}
  }
}
</script>
<style lang="scss" scoped></style>
